// 排班管理相关接口

import { createAPI } from '@/utils/request'

// 分页查询排班
export const getWorkAPI = data => createAPI(`/work-schedulings`, 'get', data)

// 工作模式列表查询
export const getWorkListAPI = data => createAPI(`/work-patterns/all`, 'get')

// 绑定排班
export const bindWorkAPI = data => createAPI(`/work-schedulings`, 'put', data)

// 工作模式列表分页查询
export const getWorkListPageAPI = data => createAPI(`/work-patterns/page`, 'get', data)

// 工作模式删除
export const delWorkAPI = id => createAPI(`/work-patterns/${id}`, 'delete')

// 新增工作模式
export const addWorkAPI = data => createAPI(`/work-patterns`, 'post', data)

// 根据工作模式id获取工作模式详情
export const getDetailAPI = id => createAPI(`/work-patterns/${id}`, 'get')

// 修改工作模式
export const updateWorkAPI = data => createAPI(`/work-patterns`, 'put', data)
